package com.exp.service;

import com.exp.dao.HotBusinessMapper;
import com.exp.dao.more.MoreHotBusinessMapper;
import com.exp.model.HotBusiness;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 Created by guojianyu on 2016/1/24.
 */
@Service
@Transactional
public class HotBusinessService {
 @Autowired
 private MoreHotBusinessMapper moreHotBusinessMapper;
 @Autowired
 private HotBusinessMapper hotBusinessMapper;
 public List<HotBusiness> getList(Map<String, Object> params) {
  return moreHotBusinessMapper.getList(params);
 }
 public int add(HotBusiness hotBusiness){
  return hotBusinessMapper.insertSelective(hotBusiness);
 }
 public int update(HotBusiness hotBusiness){
  return  hotBusinessMapper.updateByPrimaryKeySelective(hotBusiness);
 }
 public int delete(Integer id){
  return  hotBusinessMapper.deleteByPrimaryKey(id);
 }
}
